<template>
	<sc-table-select
		ref="tableselect"
		v-model="goodsvalue"
		:attrList="attrList"
		:valueList="valueList"
		:queryList="queryList"
		:table-width="640"
		collapse-tags
		collapse-tags-tooltip
		:props="props"
		@change="change"
	>
		<template #header="{}">
			<el-form :inline="true">
				<el-row :gutter="5"
					><el-col :span="5">
						<el-input
							v-model="queryList.Code"
							placeholder="请输入物品编码"
							style="width: 120px"
						></el-input></el-col
					><el-col :span="5">
						<el-input
							v-model="queryList.Name"
							placeholder="请输入物品名称"
							style="width: 120px"
						></el-input> </el-col
					><el-col :span="5"
						><el-select
							v-model="queryList.TypeCode"
							placeholder="请选择物品类型"
							style="width: 120px"
							clearable
							:teleported="false"
						>
							<el-option
								label="---请选择---"
								value=""
							></el-option>
							<el-option label="直营店" value="01"></el-option>
							<el-option
								label="加盟店"
								value="02"
							></el-option> </el-select></el-col
					><el-col :span="5">
						<el-select
							v-model="queryList.State"
							placeholder="请选择机构状态"
							clearable
							:teleported="false"
							style="width: 120px"
						>
							<el-option
								label="---请选择---"
								value=""
							></el-option>
							<el-option label="禁用" value="0"></el-option>
							<el-option
								label="正常"
								value="1"
							></el-option> </el-select></el-col
					><el-col :span="4">
						<el-button
							type="primary"
							@click="$refs.tableselect.getData()"
							>查询</el-button
						></el-col
					></el-row
				>
			</el-form>
		</template>
		<el-table-column
			label="商品主图"
			prop="MainAttachment"
			width="100"
			align="center"
		>
			<template #default="scope">
				<el-image
					style="height: 60px"
					:src="scope.row.MainAttachment"
					:fit="contain"
					:zoom-rate="1.2"
					:max-scale="7"
					:min-scale="0.2"
					:preview-src-list="[scope.row.MainAttachment]"
					:z-index="999"
					:preview-teleported="true"
				/>
			</template>
		</el-table-column>
		<el-table-column
			prop="GoodsCode"
			label="商品编码"
			width="100"
		></el-table-column>
		<el-table-column
			prop="GoodsName"
			label="商品名称"
			width="180"
		></el-table-column>
		<el-table-column
			prop="Standard"
			label="规格"
			width="150"
		></el-table-column>
		<el-table-column
			prop="GoodsTypeName"
			label="大类"
			width="120"
		></el-table-column>
		<el-table-column
			prop="SubGoodsTypeName"
			label="小类"
			width="150"
		></el-table-column>
		<el-table-column
			prop="UomName"
			label="单位"
			width="100"
		></el-table-column>
		<el-table-column
			prop="SalePrice"
			label="售价"
			width="100"
		></el-table-column>
	</sc-table-select>
</template>

<script>
export default {
	name: "goodsSelect",
	data() {
		return {
			attrList: {
				Name: "Goods",
				UseDistinct: false,
				OrgCode: "",
				UseBackUp: false,
				UseGroup: false,
			},
			valueList: {
				Code: "GoodsCode",
				Name: "GoodsName",
				Standard: "Standard",
				UomCode: "UomCode",
				UomName: "UomName",
				GoodsTypeName: "GoodsTypeName",
				SubGoodsTypeName: "SubGoodsTypeName",
				SalePrice: "SalePrice",
				State: "State",
				MainAttachment: "MainAttachment",
			},
			queryList: {
				Code: "",
				Name: "",
				OrderTypeCode: "",
				OrderSubTypeCode: "",
				State: "1",
			},
		};
	},
	computed: {},
	mounted() {},
};
</script>

<style scoped></style>
